import { ref, computed ,onMounted} from 'vue'
import { defineStore } from 'pinia'
import {getCategoryListApi}  from '@/apis/layout.js'
import {useCartStore} from "@/stores/cartStore.js"

export const useLaoyoutStore = defineStore('LayoutListStore', () => {


  //state
  let CateGoryList = ref([])

  const catStore = useCartStore();

  //action
  const getCategoryList = async()=> {
    const res = await getCategoryListApi()
    CateGoryList.value = res.result
  }



  console.log(CateGoryList)
  return { CateGoryList, getCategoryList }
})
